/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proyectomodulov;

/**
 *
 * @author angelTorralboJimenez
 */


import com.mysql.jdbc.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
 

public class Conexion{
    
    
    
    //parametros para la conexion
    
    private static Connection cn = null;
    private static String URL = "jdbc:mysql://127.0.0.1:3306/fichas";
    private static String usuario = "root";
    private static String contrasena = "root";
    private static String prueba = "";
    
    
    
    
    public static Connection getConexion() throws SQLException, ClassNotFoundException {
        DriverManager.registerDriver(new com.mysql.jdbc.Driver());
        
        cn = (Connection) DriverManager.getConnection(URL, usuario, contrasena);
        
        return cn;
    }   
          
    
}
